package breaker

import (
	"github.com/gogf/gf/net/ghttp"
)

// 熔断器
func GfBreaker(option ...Option) func(r *ghttp.Request) {
	brk := NewBreaker(option...)
	return func(r *ghttp.Request) {
		r.SetCtxVar("Breaker", brk)
		r.Middleware.Next()
		return
	}
}

